﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EnvDTE;

using UML2DOC.Interfaces;

namespace UML2DOC.ModelProjectEnumerator
{
    public class ModelProject : IModelProject 
    {

        public ModelProject(string modelProjectName, ProjectItems projectItems)
        {
            _modelProjectName = modelProjectName;
            PopulateDiagramList(projectItems);

        }

        private void PopulateDiagramList(ProjectItems projectItems)
        {
            IDiagram diagram; 
            diagrams = new List<IDiagram>();

            foreach (ProjectItem item in projectItems)
            {
                diagram = new Diagram(item.Name);
                diagrams.Add(diagram);
            }
        }

        private string _modelProjectName;
        public string ModelProjectName
        { 
            get {return _modelProjectName;}

            set { _modelProjectName = value; }
        }

        private IList<IDiagram> diagrams;
        public IList<IDiagram> Diagrams
        {
            get { return diagrams; }

            set { diagrams = value; }
        }
    }
}
